﻿using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

public partial class aspnet_admin_bock_keyWord_CX_keyWord_AddNew : System.Web.UI.Page
{
    public Tong.TongUse TextData = new Tong.TongUse();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            PageSave();
        }
    }



    protected void PageSave()
    {
        

        string Check = Request.Form["keyWord_Name"];//得到所有的分类
        if (Check == null)
        {
            tt.Text = "请选择分类";
        }
        else
        {

            //if (Cx_keyWord_Name.Text != "" && Cx_keyWord_Name.Text.Length < 250 && TextData.SqlataSet("select Cx_keyWord_Name from  [CX_keyWord] where Cx_keyWord_Name='" + Cx_keyWord_Name.Text.Trim() + "'").Tables[0].Rows.Count == 0)
            //{
            //    try
            //    {
            //        int.Parse(Cx_keyWord_Sort.Text.Trim());
            //        if (int.Parse(Cx_keyWord_Sort.Text.Trim()) <= 99999)
            //        {
            //            TextData.SqlDataSave("insert into [CX_keyWord] (Cx_keyWord_Name,Cx_keyWord_Sort,CX_keyWord_Class_id) values('" + Cx_keyWord_Name.Text.Trim() + "'," + Cx_keyWord_Sort.Text.Trim() + ",'" + Check + "')");
            //            tt.Text = "添加关键字" + Cx_keyWord_Name.Text + "成功";
            //            Cx_keyWord_Name.Text = "";

            //        }
            //        else
            //        {
            //            tt.Text = "排序超出范围";
            //        }
            //    }
            //    catch
            //    {
            //        tt.Text = "排序超出范围";
            //    }

            //}
            //else
            //{
            //    tt.Text = "输入的关键字为空或超过250个或以存在相同关键字";

            //}
        }
    }

}